/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlEditReceiveGoods.java
 *
 * Created on 22 ม.ค. 2553, 16:02:19
 */

package Inventory;

/**
 *
 * @author Administrator
 */
public class PnlEditReceiveGoods extends javax.swing.JPanel {

    /** Creates new form PnlEditReceiveGoods */
    public PnlEditReceiveGoods() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        pnlHeadEditRe1 = new javax.swing.JPanel();
        lblHeadEditReceive = new javax.swing.JLabel();
        btnReceiveEditSave = new javax.swing.JButton();
        btnReceiveEditCancel = new javax.swing.JButton();
        btnReceiveEditDel = new javax.swing.JButton();
        btnReceivePrint = new javax.swing.JButton();
        btnReceiveEditEdit = new javax.swing.JButton();
        pnlEditReGo1 = new javax.swing.JPanel();
        txtReCode = new javax.swing.JTextField();
        lblInvoiceCode = new javax.swing.JLabel();
        txtInvoiceCode = new javax.swing.JTextField();
        txtPoCode1 = new javax.swing.JTextField();
        lblPoCode1 = new javax.swing.JLabel();
        lblPoCode = new javax.swing.JLabel();
        txtPoCode = new javax.swing.JTextField();
        lblReCode = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListReGo = new javax.swing.JTable();
        lblEmCode = new javax.swing.JLabel();
        txtEmCode = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        jPanel1.setMaximumSize(new java.awt.Dimension(700, 500));
        jPanel1.setMinimumSize(new java.awt.Dimension(700, 500));
        jPanel1.setPreferredSize(new java.awt.Dimension(700, 500));
        jPanel1.setLayout(new java.awt.BorderLayout());

        pnlHeadEditRe1.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadEditRe1.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditRe1.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditRe1.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadEditReceive.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadEditReceive.setText("การรับสินค้า");

        btnReceiveEditSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N
        btnReceiveEditSave.setMaximumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditSave.setMinimumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditSave.setPreferredSize(new java.awt.Dimension(40, 40));

        btnReceiveEditCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N
        btnReceiveEditCancel.setMaximumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditCancel.setMinimumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditCancel.setPreferredSize(new java.awt.Dimension(40, 40));

        btnReceiveEditDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N
        btnReceiveEditDel.setMaximumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditDel.setMinimumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditDel.setPreferredSize(new java.awt.Dimension(40, 40));

        btnReceivePrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnReceivePrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnReceivePrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnReceivePrint.setPreferredSize(new java.awt.Dimension(40, 40));

        btnReceiveEditEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/addTable_30x30.gif"))); // NOI18N
        btnReceiveEditEdit.setMaximumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditEdit.setMinimumSize(new java.awt.Dimension(40, 40));
        btnReceiveEditEdit.setPreferredSize(new java.awt.Dimension(40, 40));
        btnReceiveEditEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReceiveEditEditActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlHeadEditRe1Layout = new javax.swing.GroupLayout(pnlHeadEditRe1);
        pnlHeadEditRe1.setLayout(pnlHeadEditRe1Layout);
        pnlHeadEditRe1Layout.setHorizontalGroup(
            pnlHeadEditRe1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadEditRe1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadEditRe1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadEditReceive)
                    .addGroup(pnlHeadEditRe1Layout.createSequentialGroup()
                        .addGap(0, 0, 0)
                        .addComponent(btnReceiveEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnReceiveEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnReceiveEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnReceiveEditEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnReceivePrint, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(438, Short.MAX_VALUE))
        );
        pnlHeadEditRe1Layout.setVerticalGroup(
            pnlHeadEditRe1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlHeadEditRe1Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lblHeadEditReceive)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadEditRe1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnReceivePrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnReceiveEditEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnReceiveEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnReceiveEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnReceiveEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel1.add(pnlHeadEditRe1, java.awt.BorderLayout.PAGE_START);

        txtReCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        lblInvoiceCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblInvoiceCode.setText("รหัสใบภาษี :");

        txtInvoiceCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        txtPoCode1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        lblPoCode1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblPoCode1.setText("รหัสผู้จำหน่าย :");

        lblPoCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblPoCode.setText("รหัสใบสั่งซื้อ :");

        txtPoCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        lblReCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblReCode.setText("รหัสใบรับสินค้า :");

        tblListReGo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblListReGo.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "รหัสสินค้า", "รายการสินค้า", "จำนวนสินค้า", "ราคา/หน่วย", "หน่วย"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListReGo);

        lblEmCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmCode.setText("พนักงาน :");

        txtEmCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtEmCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmCodeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEditReGo1Layout = new javax.swing.GroupLayout(pnlEditReGo1);
        pnlEditReGo1.setLayout(pnlEditReGo1Layout);
        pnlEditReGo1Layout.setHorizontalGroup(
            pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblEmCode)
                            .addComponent(lblPoCode1)
                            .addComponent(lblReCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtEmCode)
                            .addComponent(txtPoCode1)
                            .addComponent(txtReCode, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                                .addGap(16, 16, 16)
                                .addComponent(lblInvoiceCode))
                            .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblPoCode)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtInvoiceCode)
                            .addComponent(txtPoCode, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)))
                    .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 680, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlEditReGo1Layout.setVerticalGroup(
            pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                        .addComponent(txtPoCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtInvoiceCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblInvoiceCode)))
                    .addGroup(pnlEditReGo1Layout.createSequentialGroup()
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtReCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblPoCode)
                            .addComponent(lblReCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblPoCode1)
                            .addComponent(txtPoCode1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEditReGo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEmCode)
                    .addComponent(txtEmCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(150, Short.MAX_VALUE))
        );

        jPanel1.add(pnlEditReGo1, java.awt.BorderLayout.CENTER);

        add(jPanel1, java.awt.BorderLayout.PAGE_END);
    }// </editor-fold>//GEN-END:initComponents

    private void btnReceiveEditEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReceiveEditEditActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_btnReceiveEditEditActionPerformed

    private void txtEmCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmCodeActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtEmCodeActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnReceiveEditCancel;
    private javax.swing.JButton btnReceiveEditDel;
    private javax.swing.JButton btnReceiveEditEdit;
    private javax.swing.JButton btnReceiveEditSave;
    private javax.swing.JButton btnReceivePrint;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblEmCode;
    private javax.swing.JLabel lblHeadEditReceive;
    private javax.swing.JLabel lblInvoiceCode;
    private javax.swing.JLabel lblPoCode;
    private javax.swing.JLabel lblPoCode1;
    private javax.swing.JLabel lblReCode;
    private javax.swing.JPanel pnlEditReGo1;
    private javax.swing.JPanel pnlHeadEditRe1;
    private javax.swing.JTable tblListReGo;
    private javax.swing.JTextField txtEmCode;
    private javax.swing.JTextField txtInvoiceCode;
    private javax.swing.JTextField txtPoCode;
    private javax.swing.JTextField txtPoCode1;
    private javax.swing.JTextField txtReCode;
    // End of variables declaration//GEN-END:variables

}
